package com.yuxi.search;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yuxi.pubInter.BaseSearch;
import com.yuxi.model.Product;
import java.util.Date;
import java.util.List;
import java.math.BigDecimal;
import lombok.Data;
/**
*   @author com.yuxi
*   @Date 2023-10-18 23:45:30
*   @description ProductSearch      产品
*/


@Data
@ApiModel("产品ProductSearch")
public abstract class ProductSearch<Sub extends ProductSearch<Sub>> extends BaseSearch {
    @ApiModelProperty(value = "主键")
    private List idIn;
    @ApiModelProperty(value = "大于排序")
    private Integer sortNumGreater;
    @ApiModelProperty(value = "小于排序")
    private Integer sortNumLess;
    @ApiModelProperty(value = "是否显示 1:是:Y,0:否:N")
    private List showFlagIn;
    @ApiModelProperty(value = "是否删除 1:删除:Y,0:正常:N")
    private Integer delFlagEq=0;
    @ApiModelProperty(value = "版本")
    private Integer versionEq;
    @ApiModelProperty(value = "产品名称")
    private String nameLike;
    @ApiModelProperty(value = "型号")
    private String specLike;
    @ApiModelProperty(value = "包装")
    private String packingLike;
    @ApiModelProperty(value = "分类ID")
    private String productTypeIdEq;
    @ApiModelProperty(value = "简要说明")
    private String remarkLike;
    @ApiModelProperty(value = "是否推荐 1:是:Y,0:否:N")
    private List recommendFlagIn;
    @ApiModelProperty(value = "新产品标识 1:是:Y,0:否:N")
    private List newFlagIn;
    @ApiModelProperty(value = "产品简介")
    private String introLike;
    @ApiModelProperty(value = "产品特性")
    private String featuresLike;
    @ApiModelProperty(value = "施工工艺")
    private String processLike;

    public ProductSearch() {
        setDelFlagEq(0);
    }



    /**
    * 返回子类Sub
    * @return
    */
    public abstract Sub getSubThis();

    @Override
    public String createTimeFiled() {
        return Product.CREATE_TIME;
    }
    @Override
    public String updateTimeFiled() {
        return Product.UPDATE_TIME;
    }
    @Override
    public String  setDefaultField() {
        return Product.CREATE_TIME;
    }
    @Override
    public String pkField() {
        return Product.ID;
    }

    @Override
    public String  toString() {
        return "ProductSearch{}"+super.toString();
    }
    public Sub setIdIn(List idIn){
        this.idIn = idIn;
        setInField(Product.ID, idIn);
        return getSubThis();
    }
    public Sub setSortNumGreater(Integer sortNumGreater){
        this.sortNumGreater = sortNumGreater;
        setGreaterField(Product.SORT_NUM, sortNumGreater);
        return getSubThis();
    }
    public Sub setSortNumLess(Integer sortNumLess){
        this.sortNumLess = sortNumLess;
        setLessField(Product.SORT_NUM, sortNumLess);
        return getSubThis();
    }
    public Sub setShowFlagIn(List showFlagIn){
        this.showFlagIn = showFlagIn;
        setInField(Product.SHOW_FLAG, showFlagIn);
        return getSubThis();
    }
    public Sub setDelFlagEq(Integer delFlagEq){
        this.delFlagEq = delFlagEq;
        setEqualField(Product.DEL_FLAG, delFlagEq);
        return getSubThis();
    }
    public Sub setVersionEq(Integer versionEq){
        this.versionEq = versionEq;
        setEqualField(Product.VERSION, versionEq);
        return getSubThis();
    }
    public Sub setNameLike(String nameLike){
        this.nameLike = nameLike;
        setLikeField(Product.NAME, nameLike);
        return getSubThis();
    }
    public Sub setSpecLike(String specLike){
        this.specLike = specLike;
        setLikeField(Product.SPEC, specLike);
        return getSubThis();
    }
    public Sub setPackingLike(String packingLike){
        this.packingLike = packingLike;
        setLikeField(Product.PACKING, packingLike);
        return getSubThis();
    }
    public Sub setProductTypeIdEq(String productTypeIdEq){
        this.productTypeIdEq = productTypeIdEq;
        setEqualField(Product.PRODUCT_TYPE_ID, productTypeIdEq);
        return getSubThis();
    }
    public Sub setRemarkLike(String remarkLike){
        this.remarkLike = remarkLike;
        setLikeField(Product.REMARK, remarkLike);
        return getSubThis();
    }
    public Sub setRecommendFlagIn(List recommendFlagIn){
        this.recommendFlagIn = recommendFlagIn;
        setInField(Product.RECOMMEND_FLAG, recommendFlagIn);
        return getSubThis();
    }
    public Sub setNewFlagIn(List newFlagIn){
        this.newFlagIn = newFlagIn;
        setInField(Product.NEW_FLAG, newFlagIn);
        return getSubThis();
    }
    public Sub setIntroLike(String introLike){
        this.introLike = introLike;
        setLikeField(Product.INTRO, introLike);
        return getSubThis();
    }
    public Sub setFeaturesLike(String featuresLike){
        this.featuresLike = featuresLike;
        setLikeField(Product.FEATURES, featuresLike);
        return getSubThis();
    }
    public Sub setProcessLike(String processLike){
        this.processLike = processLike;
        setLikeField(Product.PROCESS, processLike);
        return getSubThis();
    }
}